//
//  OrganizationItemModel.m
//  Utils
//
//  Created by enghou on 2018/5/1.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "OrganizationItemModel.h"
#import "NetPath.h"
@implementation OrganizationItemModel
-(instancetype)initWithSource:(NSDictionary *)source{
    self = [super initWithSource:source];
    if (self) {
        self.ids = [self contentForKey:@"id" withSource:source];
        self.title = [self contentForKey:@"name" withSource:source];
        self.headimage = [NSString stringWithFormat:@"%@/%@",ServerPath,[self contentForKey:@"imgUrl" withSource:source]];
        NSDictionary *style = [source objectForKey:@"style"];
        self.type = [self contentForKey:@"displayName" withSource:style];
        BOOL isDangerous = [[source objectForKey:@"isDangerousEnterprise"] boolValue];
        if (isDangerous) {
            self.weatherDangours = @"是否危化企业(是)";
        }else{
            self.weatherDangours = @"是否危化企业(否)";
        }
        self.address = [self contentForKey:@"residence" withSource:source];
        self.height = 100;
    }
    return self;
}
@end
